// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** getScoreById 根据分数id查询分数 GET /api/score/${param0} */
export async function getScoreByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getScoreByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.ResultScoreVO_>(`/api/score/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** addScore 教师端录入分数 POST /api/score/add */
export async function addScoreUsingPost(body: API.AddScoreDTO, options?: { [key: string]: any }) {
  return request<API.ResultInt_>('/api/score/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** getScoresByCourse 根据课程id获取分数 GET /api/score/course/${param0} */
export async function getScoresByCourseUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getScoresByCourseUsingGETParams,
  options?: { [key: string]: any },
) {
  const { courseId: param0, ...queryParams } = params;
  return request<API.ResultListScoreVO_>(`/api/score/course/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** deleteScore 教师删除分数 DELETE /api/score/delete/${param0} */
export async function deleteScoreUsingDelete(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteScoreUsingDELETEParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.ResultVoid_>(`/api/score/delete/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** listScoresToStudent 学生端展示分数 POST /api/score/list/student */
export async function listScoresToStudentUsingPost(
  body: API.QueryScoreDTO,
  options?: { [key: string]: any },
) {
  return request<API.ResultPageScoreVO_>('/api/score/list/student', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** listScoresToTeacher 教师端展示分数 POST /api/score/list/teacher */
export async function listScoresToTeacherUsingPost(
  body: API.QueryScoreDTO,
  options?: { [key: string]: any },
) {
  return request<API.ResultPageScoreVO_>('/api/score/list/teacher', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** getScoresByStudent 根据学生id获取分数 GET /api/score/student/${param0} */
export async function getScoresByStudentUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getScoresByStudentUsingGETParams,
  options?: { [key: string]: any },
) {
  const { studentId: param0, ...queryParams } = params;
  return request<API.ResultListScoreVO_>(`/api/score/student/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** updateScore 教师端修改分数 PUT /api/score/update */
export async function updateScoreUsingPut(
  body: API.UpdateScoreDTO,
  options?: { [key: string]: any },
) {
  return request<API.ResultVoid_>('/api/score/update', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** markExceptionByAdmin 管理员标记分数异常 POST /api/score/update/mark */
export async function markExceptionByAdminUsingPost(
  body: API.UpdateScoreDTO,
  options?: { [key: string]: any },
) {
  return request<API.ResultVoid_>('/api/score/update/mark', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
